import type { AppRouteModule } from '/@/router/types';
import { RoleEnum } from '/@/enums/roleEnum';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const project: AppRouteModule = {
  path: '/project',
  name: 'project',
  component: LAYOUT,
  redirect: '/project/add',
  meta: {
    orderNo: 600,
    icon: 'ant-design:tag-outlined',
    title: '项目管理',
    // hideChildrenInMenu: true,//WC
  },
  children: [
    {
      path: 'topology/:id',
      name: 'topologyManagement',
      meta: {
        title: '传感器集成',
        hideMenu: true,
        ignoreKeepAlive: true,
      },
      component: () => import('/@/views/project/topology/index.vue'),
    },
    {
      path: 'add',
      name: 'addManagement',
      meta: {
        title: '添加项目',
        ignoreKeepAlive: true,
      },
      component: () => import('/@/views/project/add.vue'),
    },
    {
      path: 'bind/:id',
      name: 'bindManagement',
      meta: {
        title: '绑定项目',
        ignoreKeepAlive: true,
        hideMenu: true
      },
      component: () => import('/@/views/project/bind/index.vue'),
    },
    {
      path: 'edit/:id',
      name: 'editManagement',
      meta: {
        title: '编辑项目',
        ignoreKeepAlive: true,
        hideMenu: true
      },
      component: () => import('/@/views/project/edit.vue'),
    },
    {
      path: 'show',
      name: 'showManagement',
      meta: {
        title: '项目展示',
        ignoreKeepAlive: true,
        roles: [RoleEnum.showManagement]
      },
      component: () => import('/@/views/project/show/index.vue'),
    },
    {
      path: 'details/:id',
      name: 'detailsManagement',
      meta: {
        title: '项目详情',
        ignoreKeepAlive: true,
        hideMenu: true
      },
      component: () => import('/@/views/project/details/index.vue'),
    },
  ],
};

export default project;
